﻿<UserControl x:Class="PersonLookup.View.PersonEdit"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             mc:Ignorable="d"
             d:DesignHeight="300"
             d:DesignWidth="400">

    <Grid x:Name="LayoutRoot"
          Background="White">
        <Border BorderBrush="Blue"
                BorderThickness="1"
                CornerRadius="3"
                Margin="2"
                Padding="3">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition MinWidth="100"  Width="*" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <TextBlock Name="textBlock1"
                           Text="First name:"
                           VerticalAlignment="Center"
                           Margin="2" />
                <TextBlock Grid.Row="1"
                           Name="textBlock2"
                           Text="Last name:"
                           VerticalAlignment="Center"
                           Margin="2" />
                <TextBox Text="{Binding FirstName, Mode=TwoWay}"
                         Grid.Column="1"
                         VerticalAlignment="Center"
                         Margin="2"
                         Grid.ColumnSpan="2" />
                <TextBox Text="{Binding LastName, Mode=TwoWay}"
                         Grid.Column="1"
                         Grid.Row="1"
                         VerticalAlignment="Center"
                         Margin="2"
                         Grid.ColumnSpan="2" />
                <Button Content="Cancel"
                        Command="{Binding CancelEditCommand}"
                        IsEnabled="{Binding IsEditing}"
                        Grid.Column="2"
                        Grid.Row="2"
                        Margin="2" />
                <Button Content="Save"
                        Command="{Binding EndEditCommand}"
                        IsEnabled="{Binding IsEditing}"
                        Grid.Column="1"
                        Grid.Row="2"
                        Margin="2"
                        HorizontalAlignment="Right"
                        VerticalAlignment="Center" />
            </Grid>
        </Border>
    </Grid>
</UserControl>
